package com.hkbigdata.springbootdi.mapper;

import com.hkbigdata.springbootdi.bean.OrderStatus;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author liuanbo
 * @creat 2024-12-04-10:13
 * @see 2194550857@qq.com
 */
@Mapper
public interface MysqlMapper {

    @Select("select DATE_FORMAT(dt, '%H:%i') as `time`,   " +
            "       sum(orderCount) as orderCount,   " +
            "       sum(refundCount) as refundCount   " +
            " from di   " +
            " where date(dt) = '2024-11-20'   " +
            " group by date_format(dt, '%H:%i')   " +
            " order by `time`;")
    List<OrderStatus> getOrderStatus(@Param("dt") String dt);
}
